The largest number of values that should be contained in this node before refactoring the tree to split this node into two. This property has a side-effect on MinimumValueNodes to ensure that it continues to be at most half of MaximumValueNodes.
Syntax
Visual Basic (Declaration) | |
---|
Public Property MaximumValueNodes As Integer |
C# | |
---|
public int MaximumValueNodes {get; set;} |
Property Value
A number in the range of 4 to 256.
Example
BPlusTree/BPlusTree.Test/TestBulkInsert.cs
C# | Copy Code |
---|
BPlusTreeOptions<int, string> options = Options;
using (TempFile temp = new TempFile())
{
options = Options;
temp.Delete();
//options.CreateFile = CreatePolicy.Always;
//options.FileName = temp.TempPath;
options.MaximumValueNodes = 14;
options.MinimumValueNodes = 7;
options.MaximumChildNodes = 6;
options.MinimumChildNodes = 2;
// Just to make sure we don't break some fencepost condition in the future
for (int i = 0; i <= (options.MaximumValueNodes * options.MaximumChildNodes) + 1; i++)
TestMergeSequenceInFile(options.Clone(), i);
TestMergeSequenceInFile(options.Clone(), options.MaximumValueNodes * options.MaximumChildNodes * options.MaximumChildNodes);
TestMergeSequenceInFile(options.Clone(), options.MaximumValueNodes * options.MaximumChildNodes * options.MaximumChildNodes + 1);
} |
VB.NET | Copy Code |
---|
Dim options As BPlusTreeOptions(Of Integer, String) = Options
Using temp As New TempFile()
options = Options
temp.Delete()
'options.CreateFile = CreatePolicy.Always;
'options.FileName = temp.TempPath;
options.MaximumValueNodes = 14
options.MinimumValueNodes = 7
options.MaximumChildNodes = 6
options.MinimumChildNodes = 2
' Just to make sure we don't break some fencepost condition in the future
Dim i As Integer = 0
While i <= (options.MaximumValueNodes * options.MaximumChildNodes) + 1
TestMergeSequenceInFile(options.Clone(), i)
System.Math.Max(System.Threading.Interlocked.Increment(i),i - 1)
End While
TestMergeSequenceInFile(options.Clone(), options.MaximumValueNodes * options.MaximumChildNodes * options.MaximumChildNodes)
TestMergeSequenceInFile(options.Clone(), options.MaximumValueNodes * options.MaximumChildNodes * options.MaximumChildNodes + 1)
End Using |
Requirements
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
See Also